squark
Rust frontend framework, for web browser and more.
Currently, we depend on nightly
channel
Design
- Separating runtime definition and implemention
squark
crate has no dependency for specific platform
- Architecture inspired from Elm and HyperApp
- Simplicy
- Elegant
- Supporting futures-0.1
- reducer can emit task for async work such as fetch resource
crates
squark
Core crate.
- Pure Rust virtual DOM implemention
- Definition of GUI application
- Definition of runtime to handle diffirence of virtual DOM
squark-macros
It provides macro like JSX for helping writing view.
Very thanks to pest parser.
Syntax
view! {
<button class="some-class" onclick={ |_| Some(Action::Submit) }>
Button!
</button>
}
We can generate native Rust expression at compile-time.
squark-web
Runtime implemention for web browser with usinng wasm-bindgen.
Here is full example of counter app!
extern crate squark;
extern crate squark_macros;
extern crate squark_web;
extern crate wasm_bindgen;
extern crate web_sys;
use ;
use view;
use WebRuntime;
use *;
use window;
;
Project dir is located at examples/counter.
There are some other examples available on examples, most of them use rust-webpack-template.
TodoMVC is working on https://rail44.github.io/squark/.